<!doctype html>
<html>

<head>
	<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<meta charset="utf-8">
	<meta http-equiv="pragma" content="no-cache">
<!-- HTTP 1.0 -->
<meta http-equiv="cache-control" content="no-cache">
	<link rel="stylesheet" href="{MODULE_URL}resource/css/style.css" /> {if $color!=""}
	<link rel="stylesheet" href="{MODULE_URL}resource/css/{$color}.css" /> {/if}
	<script type="text/javascript" src="{MODULE_URL}resource/js/jquery-2.1.4.min.js"></script>
	<title>{$huodongname}</title>
	{php echo register_jssdk();}
	<script type="text/javascript">
		var ua = navigator.userAgent.toLowerCase();
		var isWeixin = ua.indexOf('micromessenger') != -1;
		var isAndroid = ua.indexOf('android') != -1;
		var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1);
		if (!isWeixin) {
			document.head.innerHTML =
				'<title>抱歉，出错了</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"><link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">';
		document.body.innerHTML =
				'<div class="weui_msg"><div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div></div>';
		}
	</script>
	<style> 
	#cover {
    z-index: 10000;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    font-size: 1.8rem;
    display: none;
}

#cover .content {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 10003;
   
    padding: 1rem;
    padding-top: 60%;
}
#cover .content p{
line-height:3rem;
}

#jldiv{
width:100%;padding:10%;
}

body {
    color: #666;
    font-size: 1.8rem;
    line-height: 150%;
   background-color:#fff;
}
</style>
</head>

<body>

 
<iframe src="{$reply[shareurl]}" 
frameborder="none" scrolling="auto" style="width: 100%; height: 100%;"></iframe>

<!-- 
<div class="fui-page">
	<div class="fui-content">
		<div id='cover' style="display: block!important;">
		    <div class='fui-mask-m visible'></div>
		    <div class='arrow'></div>
		    <div class='content'>
		    <p>分享当前页面即可以获取必考题答案</p>
				<p>并可以获得领取宝藏资格</p>
			</div>
		</div>
		
		
	</div>
</div>
 -->


<!-- 

<div id="jldiv" style="display:none;">
			<p >题目:<span class="question"></span></p>
			<p>答案:<span class="realanswer"></span></p></div>
</div>
 -->


	
	

	

	
</body>

<script>
		$(document).ready(function () {
			//活动介绍
			$(".rule").click(function () {
				$(".popup").show(0);
			})
			$(".popup .close").click(function () {
				$(".popup").hide(0);
			})
			$(".share,.tips").click(function () {
				$(".tips").toggle(0);
			})

			$(".close").click(function () {
				$(this).closest(".result").hide(0);
			})
		})



		function seeme() {
			var rid = '{$rid}';
			var url = "{php echo $this->createMobileUrl('chengji')}";
			location.href = url + "&rid=" + rid + "&nocount=1";
		}

		wx.ready(function () {
			sharedata = {
				title: "{$sharetitle} ",
				desc: "{$sharecontent}",
				link: "{$sharelink}",
				imgUrl: "{$shareimg}",
				success: shareSuccess
             
			};
			wx.onMenuShareAppMessage(sharedata); //分享给朋友
			wx.onMenuShareTimeline(sharedata); //分享到朋友圈
			wx.showOptionMenu(); //显示右上角按钮
		});
		
		 function shareSuccess() {
			 
			 
			 setTimeout(function(){
				    //回调要执行的代码
				   
			$.ajax({ 
		        
		        type:'get',
                async:false,
		        data:{}, 
		        
		        url:"{php echo $this->createMobileUrl('goshare',array('rid'=>$reply['rid']))}",
		        
		        dataType:'json',
		        
		        success:function(data){
		          
		          if(data.success == 1){
		        
		          
		        	//$('.fui-page').hide();
		        	//$('#jldiv').show();
		        	//$(".question").html(data.question);
		        //	$(".realanswer").html(data.realanswer);
		        	  alert('分享成功必考题目:'+data.question+'答案:'+data.realanswer);
		          }
		        
		          else{
		        
		            alert('分享失败');
		           
		          
		          }
		        }
		      
		      })   
				    
		  //回调结束 		    
			}, 500);

		     
		  
		  }
	</script>
</html>